Skip to content

Improve workflow examples#949

Merged
artursouza merged 23 commits into
dapr:masterfrom
kaibocai:kaibocai/improve-workflow-examples
Dec 4, 2023
Merged

Improve workflow examples#949
artursouza merged 23 commits into
dapr:masterfrom
kaibocai:kaibocai/improve-workflow-examples

Conversation

@kaibocai

@kaibocai kaibocai commented Nov 8, 2023

Copy link
Copy Markdown
Contributor

Description

This PR

  1. improve workflow examples by adding a few widely used patterns
  1. update the grpc dependency version so it works with the latest durabletask-java client v1.5.0

This PR is based on #947, and should be merged after it.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #944, #911

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

Signed-off-by: kaibocai <89094811+kaibocai@users.noreply.github.com>
Signed-off-by: kaibocai <89094811+kaibocai@users.noreply.github.com>
Signed-off-by: kaibocai <89094811+kaibocai@users.noreply.github.com>
@kaibocai kaibocai requested review from a team as code owners November 8, 2023 00:37
@kaibocai

kaibocai commented Nov 8, 2023

Copy link
Copy Markdown
Contributor Author

I cannot add reviewers due to permission issues on this repo.

Tagging @johnewart , @cgillum, @artursouza , @cicoyle for review.

@cgillum cgillum left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me! Just a few small things I noticed.

Comment thread examples/src/main/java/io/dapr/examples/workflows/chain/ToUpperCaseActivity.java Outdated
Comment thread examples/src/main/java/io/dapr/examples/workflows/README.md Outdated
Comment thread examples/src/main/java/io/dapr/examples/workflows/README.md Outdated
Signed-off-by: kaibocai <89094811+kaibocai@users.noreply.github.com>
@kaibocai kaibocai force-pushed the kaibocai/improve-workflow-examples branch from b1c6aaa to 65c83ad Compare November 8, 2023 02:25

@mukundansundar mukundansundar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution.
A few comments to add auto validation mechanical-markdown script to README and removal of gRPC update and have it as a separate one if possible.

Comment thread examples/src/main/java/io/dapr/examples/workflows/README.md
Comment thread pom.xml
Comment thread sdk-actors/pom.xml
Comment thread sdk-workflows/src/main/java/io/dapr/workflows/WorkflowContext.java
Signed-off-by: kaibocai <89094811+kaibocai@users.noreply.github.com>
Signed-off-by: kaibocai <89094811+kaibocai@users.noreply.github.com>
@cicoyle

cicoyle commented Nov 9, 2023

Copy link
Copy Markdown
Contributor

This is great - thanks for enhancing the workflow example 🎉 It looks like you may need to tweak the port, since the build is failing due to the port not being available, but looks good 👍🏻

Signed-off-by: kaibocai <kaibocai@microsoft.com>
Signed-off-by: kaibocai <kaibocai@microsoft.com>
Signed-off-by: kaibocai <kaibocai@microsoft.com>
@kaibocai kaibocai force-pushed the kaibocai/improve-workflow-examples branch from 256849f to 3eef63e Compare November 13, 2023 18:48
Signed-off-by: kaibocai <kaibocai@microsoft.com>
@kaibocai

Copy link
Copy Markdown
Contributor Author

Hi @artursouza , @cicoyle and @mukundansundar . I need some help on the Auto Validate Examples, I could not figure out the right configuration. However, everything works as expected on my local. Thanks.

kaibocai and others added 2 commits November 27, 2023 10:38
Signed-off-by: Kaibo Cai (from Dev Box) <kaibocai@microsoft.com>
@artursouza artursouza self-assigned this Nov 27, 2023
Comment thread examples/src/main/java/io/dapr/examples/workflows/README.md Outdated
Comment thread examples/src/main/java/io/dapr/examples/workflows/README.md Outdated
Once you start the workflow and client using the following commands:
```sh
dapr run --app-id demoworkflowworker --resources-path ./components/workflows --dapr-grpc-port 50001 -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.DemoWorkflowWorker
dapr run --app-id demoworkflowworker --resources-path ./components/workflows -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.continueasnew.DemoContinueAsNewWorker

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automation with MM

Comment thread examples/src/main/java/io/dapr/examples/workflows/README.md Outdated
Comment thread examples/src/main/java/io/dapr/examples/workflows/README.md Outdated
Signed-off-by: kaibocai <89094811+kaibocai@users.noreply.github.com>
Signed-off-by: kaibocai <89094811+kaibocai@users.noreply.github.com>
@kaibocai kaibocai changed the title Improve workflow examples - update grpc version Improve workflow examples Nov 28, 2023
Signed-off-by: kaibocai <89094811+kaibocai@users.noreply.github.com>
kaibocai and others added 6 commits November 28, 2023 11:18
Signed-off-by: kaibocai <89094811+kaibocai@users.noreply.github.com>
Signed-off-by: kaibocai <89094811+kaibocai@users.noreply.github.com>
Signed-off-by: kaibocai <89094811+kaibocai@users.noreply.github.com>
Signed-off-by: kaibocai <89094811+kaibocai@users.noreply.github.com>
Signed-off-by: kaibocai <89094811+kaibocai@users.noreply.github.com>
@codecov

codecov Bot commented Nov 30, 2023

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3b0747c) 76.54% compared to head (a488e5f) 76.54%.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #949   +/-   ##
=========================================
  Coverage     76.54%   76.54%           
  Complexity     1467     1467           
=========================================
  Files           137      137           
  Lines          4472     4472           
  Branches        527      527           
=========================================
  Hits           3423     3423           
  Misses          763      763           
  Partials        286      286           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mukundansundar mukundansundar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Probably rewrite workflow example for better understanding

5 participants